package com.mxpio.erp.common.quality.entity;

import com.mxpio.erp.common.jpa.model.OrderLine;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.User;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @Author : 吴盼盼
 * @Datetime : 2022/12/10 10:36
 * @Desc :  报废出库申请 明细
 * @Modor :  Modifytime:
 * @modDesc :
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_QUALITY_SOA_LINE")
@Schema(description="报废出库申请细行")
public class ScrapOutApplyLine extends OrderLine {

    private static final long serialVersionUID = 1L;

    @Column(name = "SCRAP_REASON_")
    @Schema(description = "报废原因")
    private String scrapReason;

    @Column(name = "QC_STATUS_")
    @Schema(description = "质检状态")
    @Dict(dicCode = "ERP_QUAL_SUBLOT_USAGE_DECISION")//不良品申请单 申请决策
    private String qcStatus;

    @Column(name = "MEMO_")
    @Schema(description = "备注")
    private String memo;

    @Column(name = "UNQUALIFIED_TYPE_")
    @Schema(description = "不合格原因类型")
    @Dict(dicCode = "ERP_QUAL_UNQUALIFIED_TYPE")
    private String unqualifiedType;

    @Column(name = "UNQUALIFIED_REASON_")
    @Schema(description = "不合格原因")
    private String unqualifiedReason;

    @Column(name = "RESPONSE_UNIT_")
    @Schema(description = "责任单位")
    private String responseUnit;

    @Column(name = "RESPONSE_PARTY_")
    @Schema(description = "责任方")
    @Dict(dicCode = "ERP_QUAL_RESPONSE_PARTY")
    private String responseParty;

    @Column(name = "RESPONSE_PERSON_")
    @Schema(description = "责任人")
    @Dict(dicCode = "username", dicEntity = User.class, dicText = "nickname")
    private String responsePerson;

}
